package engine.systems.control.platformerKeyControl
{
	import ash.core.Component;
	
	import flash.ui.Keyboard;
	
	public class PlatformerKeyControl extends Component
	{
		internal var _jumping:Boolean 		= false;
		internal var _falling:Boolean 		= false;
		internal var _walkingLeft:Boolean 	= false;
		internal var _walkingRight:Boolean	= false;
		
		public var left:uint;
		public var right:uint;
		public var jump:uint;
		
		public var walkAcceleration:Number 	= 300;
		public var jumpVelocity:Number 		= 600;
		
		public function PlatformerKeyControl(left:uint = Keyboard.LEFT, right:uint = Keyboard.RIGHT, jump:uint = Keyboard.UP)
		{
			this.left 	= left;
			this.right 	= right;
			this.jump 	= jump;
		}
		
		public function get jumping():Boolean 		{ return this._jumping; }
		public function get falling():Boolean 		{ return this._falling; }
		public function get walkingLeft():Boolean 	{ return this._walkingLeft; }
		public function get walkingRight():Boolean 	{ return this._walkingRight; }
	}
}